<admintpl file="header" />
<style>
    .information{
        display: none;
        min-height: 20px;
    }
    .row-fluid .active{
        display: block;
    }
    .tabbed{
        border-bottom: solid 2px #ccc;
    }
    .uploadList ul li{
        list-style: none;
    }
    .uploadList ul li img{
        max-height: 90px;
    }
    #resion{
        display: none;
    }
</style>
<script type="text/javascript" src="__PUBLIC__/uploadify/jquery.uploadify.min.js"></script>
<link rel="stylesheet" href="__PUBLIC__/uploadify/uploadify.css">
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="menu-bar active"><a href="#"> 用户信息 </a></li>
        <!--<li class="menu-bar"><a href="#"> 认证信息 </a></li>-->
    </ul>
    <form action="{:U('Member/watch')}" method="post" class="form-horizontal js-ajax-forms" enctype="multipart/form-data">
        <div class="row-fluid">
                <div class="information active">
                    <div class="span9">
                        <table class="table table-bordered">
                            <tr>
                                <th> 姓名 </th>
                                <td>
                                    <input type="text" style="width: 400px;" name="user_name" value="{$data['user_name']}"/>
                                    <span class="form-required">*</span>
                                </td>
                            </tr>
                            <tr>
                                <th>电话</th>
                                <td><input type="text" name="phone" value="{$data['phone']}" style="width: 400px"></td>
                            </tr>
                            <tr>
                                <th>销售员编号</th>
                                <td><input type="text" name="number" value="{$data['number']}" style="width: 400px"></td>
                            </tr>
                            <tr>
                                <th>营业执照名</th>
                                <td><input type="text" name="license_name" value="{$data['license_name']}" style="width: 400px"></td>
                            </tr>
                            <tr>
                                <th>营业执照编号</th>
                                <td><input type="text" name="license_id" value="{$data['license_id']}" style="width: 400px"></td>
                            </tr>
                            <tr>
                                <th>营业执照图</th>
                                <td>
                                    <div lab="uploadFile">

                                        <input id="di_card_back" type="file" multiple="false">
                                        <script type="text/javascript">
                                            $(function() {
                                                var path2 = "{$data['license_img']}";
                                                $('#di_card_back').uploadify({
                                                    'formData'    : {          //POST数据
                                                        '<?php echo session_name();?>' : '<?php echo session_id();?>',
                                                    },
                                                    'fileTypeDesc' : '上传文件',//上传描述
                                                    'fileTypeExts' : '*.jpeg;,*.jpg;*.png,*.JPEG;,*.JPG;*.PNG',
                                                    'swf'      : '__PUBLIC__/uploadify/uploadify.swf',
                                                    'uploader' : "{:U('User/File/upload')}",
                                                    'buttonText':'选择文件',
                                                    'fileSizeLimit' : '2048KB',
                                                    'uploadLimit' : 1,//上传文件数
                                                    'width':90,
                                                    'height':36,
                                                    'successTimeout':10,//等待服务器响应时间
                                                    'removeTimeout' : 0.2,//成功显示时间
                                                    'onUploadSuccess' : function(file, data, response) {
                                                        //转为json
                                                        data=$.parseJSON(data);
                                                        //获得图片地址
                                                        var imageUrl = data.url;
                                                        var li="<li path='"+data.path+"' url='"+data.url+"'><img src='__ROOT__"+imageUrl+"'/><input type='hidden' name='license_img' value='"+imageUrl+"'/></li>";
                                                        $("#uploadLogoBack ul").html(li);
                                                    }
                                                });
                                            });
                                        </script>
                                        <div id="uploadLogoBack" class="uploadList">
                                            <ul>
                                                <li path="{$data[license_img]}" url="{$data['license_img']}"><img src="{$data[license_img]}"/><input type='hidden' name='license_img' value="{$data[license_img]}"/>
                                            </ul>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            <tr id="resion">
                                <th>原因</th>
                                <td>
                                    <textarea id="resion_text" name="resion" style="width:420px;height:60px;"></textarea>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>

                <div class="span3">
                    <table class="table table-bordered">
                        <tr>
                            <th>缩略图</th>
                        </tr>
                        <tr>
                            <td>
                                <div style="text-align: center;">
                                    <input type="hidden" name="avatar" id="thumb" value="{$data['avatar']}">
                                    <a href="javascript:upload_one_image('图片上传','#thumb');">
                                        <if condition="$data['avatar']">
                                            <img src="{$data['avatar']}" id="thumb-preview" width="135" style="cursor: hand" />
                                            <else/>
                                            <img src="__TMPL__Public/assets/images/default-thumbnail.png" id="thumb-preview" width="135" style="cursor: hand" />
                                        </if>
                                    </a>
                                    <input type="button" class="btn btn-small" onclick="$('#thumb-preview').attr('src','__TMPL__Public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;" value="取消图片">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <th>注册时间</th>
                        </tr>
                        <tr>
                            <td>{$data['create_time']}</td>
                        </tr>
                        <tr>
                            <th>性别</th>
                        </tr>
                        <tr>
                            <td>
                                 <input type="radio" name="sex" value="1" <if condition="$data['sex'] eq 1">checked</if> > 男 &nbsp; &nbsp;
                                 <input type="radio" name="sex" value="2" <if condition="$data['sex'] eq 2">checked</if>>  女  &nbsp; &nbsp;
                                 <input type="radio" name="sex" value="0" <if condition="$data['sex'] eq 0">checked</if>>  保密
                            </td>
                        </tr>
                        <if condition="$data['status'] eq 1">
                           <tr>
                               <th>认证</th>
                           </tr>
                           <tr>
                               <td>
                                   <input id="pass" type="radio" name="status" value="2" checked > 通过 &nbsp; &nbsp;
                                   <input id="reject" type="radio" name="status" value="3"  > 拒绝 &nbsp; &nbsp;
                               </td>
                           </tr>
                        </if>
                    </table>
                </div>
            </div>
        <input type="hidden" name="id" value="{$_GET['id']}">
        <div class="form-actions">
            <button class="btn btn-primary js-ajax-submit" type="submit">{:L("SAVE")}</button>
            <a class="btn" href="javascript:history.back(-1);">{:L('BACK')}</a>
        </div>
    </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
    $(function(){
       $("#reject").click(function(){
            $("#resion").show();
       })
        $("#pass").click(function(){
            $("#resion_text").val('');
            $("#resion").hide();
        })
    })
</script>
</body>
</html>